var cjs=createjs,stage,canvas,exportRoot,images={},as=new ASCaiNiao();
function init(){
    canvas =document.getElementById('canvas');
    //console.log(canvas.clientWidth,canvas.clientHeight);
    canvas.width=canvas.clientWidth;
    canvas.height=canvas.clientHeight;
    stage = new cjs.Stage(canvas);
    cjs.Touch.enable(stage); //允许设备触控
    exportRoot = new cjs.Container();
    exportRoot.parent=stage;
    exportRoot.setTransform(canvas.width,0,1,1,90);
    stage.addChild(exportRoot);
    cjs.Ticker.setFPS(60);
    cjs.Ticker.addEventListener("tick", function(e){
        stage.update();
    });
    //
    as.properties.width=canvas.height;
    as.properties.height=canvas.width;
    as.GameControl.init(exportRoot);
}